import numpy as np


max_min_scaler = lambda x : (x-np.min(x))/(np.max(x)-np.min(x)) * 100

def trans(dataframe):
    """
    归一化
    :param dataframe:
    :return:
    """
    dataframe['close'] = dataframe[['close']].apply(max_min_scaler)
    dataframe['open'] = dataframe[['open']].apply(max_min_scaler)
    dataframe['high'] = dataframe[['high']].apply(max_min_scaler)
    dataframe['low'] = dataframe[['low']].apply(max_min_scaler)
    return dataframe

